﻿''' <summary>
''' 孔方案行映射
''' </summary>
Public Class HoleSchemeLineMapper
    Private db As IMySqlService = New MySqlServiceImpl

    Public Function [Select]() As DataTable
        Dim sql As String = <sql>
                                select * from hole_scheme_line inner join hole_scheme_head using (head_id) where 1 = 1
                            </sql>
        Return db.select(sql)
    End Function

    Public Function Select_ByLineId(ByVal line_id As Integer) As DataTable
        Dim sql As String = <sql>
                                select * from hole_scheme_line inner join hole_scheme_head using (head_id) where line_id = {0}
                            </sql>
        Return db.select(String.Format(sql, line_id))
    End Function

    Public Function Select_ByHeadId(ByVal head_id As Integer) As DataTable
        Dim sql As String = <sql>
                                select * from hole_scheme_line inner join hole_scheme_head using (head_id) where head_id = {0}
                            </sql>
        Return db.select(String.Format(sql, head_id))
    End Function
End Class
